package com.yjt.fresh.adpater;

import android.support.annotation.Nullable;
import android.text.Html;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yjt.fresh.R;
import com.yjt.fresh.bean.BeanNews;
import com.yjt.fresh.bean.BeanOrder;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

import butterknife.BindView;

/**
 * @author mcc
 * @date 2018/6/10
 */

public class AdpRvAtyOrderDetailChild extends BaseQuickAdapter<BeanOrder.GOODSBean, BaseViewHolder> {
    public AdpRvAtyOrderDetailChild(int layoutResId, @Nullable List<BeanOrder.GOODSBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BeanOrder.GOODSBean item) {
        ImageView mIvContent = helper.getView(R.id.ivAppRecycleItemAtyBalanceContent);
        TextView mTvTitle = helper.getView(R.id.tvAppRecycleItemAtyBalanceContentTitle);
        TextView mTvType = helper.getView(R.id.tvAppRecycleItemAtyBalanceContentType);
        TextView mTvNewPrice = helper.getView(R.id.tvAppRecycleItemAtyBalanceContentNewPrice);
        TextView mTvOldPrice = helper.getView(R.id.tvAppRecycleItemAtyBalanceContentOldPrice);
        TextView mTvCount = helper.getView(R.id.tvAppRecycleItemAtyBalanceContentCount);
        View mV = helper.getView(R.id.vAppRecycleItemAtyBalanceContent);

        Glide.with(mContext).load(item.getSKU_IMG()).into(mIvContent);
        mTvTitle.setText(item.getTITLE());
        mTvType.setText(item.getSIZE());
        mTvNewPrice.setText(item.getSINGLE_PRICE()+"");
        mTvOldPrice.setVisibility(View.GONE);
        mTvCount.setText("x "+item.getBUYCOUNT());


    }
}
